package de.stefanocke.roo.kontaktliste.web.comp;

import de.stefanocke.roo.kontaktliste.domain.Adresse;
import de.stefanocke.roo.kontaktliste.domain.Kontakt;
import de.stefanocke.roo.kontaktliste.web.common.FormFieldsPanel.ComplexListEditorField;
import de.stefanocke.roo.wicket.RooFormFields;
import org.apache.wicket.Component;

@RooFormFields(modelClass = Kontakt.class)
public class KontaktFormFields {

	

	public ComplexListEditorField<Adresse> createAdresseFieldList(String id) {
        return new ComplexListEditorField<Adresse>(id, this){
        			public Component createItemComponent(String id){
        				return createAdresseFieldDecorated(id);
        			}	
        			@Override
        			protected String getOrderPropertyExpression() {
        				return AdresseBindings.INDEX;
        			}
        		};
    }
}
